

// Added by the Spring Security Core plugin:
grails.plugin.springsecurity.userLookup.userDomainClassName = 'gateway.mgt.User'
grails.plugin.springsecurity.userLookup.authorityJoinClassName = 'gateway.mgt.UserRole'
grails.plugin.springsecurity.authority.className = 'gateway.mgt.Role'
grails.plugin.springsecurity.authority.groupAuthorityNameField = 'authorities'
grails.plugin.springsecurity.useRoleGroups = true
grails.plugin.springsecurity.useBasicAuth = true
grails.plugin.springsecurity.controllerAnnotations.staticRules = [
	[pattern: '/',               access: ['permitAll']],
	[pattern: '/error',          access: ['permitAll']],
	[pattern: '/index',          access: ['permitAll']],
	[pattern: '/index.gsp',      access: ['permitAll']],
	[pattern: '/shutdown',       access: ['permitAll']],
	[pattern: '/assets/**',      access: ['permitAll']],
	[pattern: '/**/js/**',       access: ['permitAll']],
	[pattern: '/**/css/**',      access: ['permitAll']],
	[pattern: '/**/images/**',   access: ['permitAll']],
	[pattern: '/**/favicon.ico', access: ['permitAll']],
    [pattern: '/apiRelease/**',  access: ['ROLE_USER']],
    [pattern: '/apiGroup/**',    access: ['ROLE_USER']],
	[pattern: '/apiDefinition.json', access: ['ROLE_USER']],
    [pattern: '/apiDefinition/**',   access: ['ROLE_USER']],
    [pattern: '/apiInOutParam/**',     access: ['ROLE_USER']],
	[pattern: '/apiConstantParam/**',  access: ['ROLE_USER']],
	[pattern: '/apiSystemParam/**',    access: ['ROLE_USER']],
	[pattern: '/apiAuth/**',           access: ['ROLE_USER']],
	[pattern: '/rateLimitStrategy/**', access: ['ROLE_USER']],
	[pattern: '/specialUser/**',       access: ['ROLE_USER']],
	[pattern: '/specialUser.json',     access: ['ROLE_USER']],
    [pattern: '/gatewayCore/**',       access: ['ROLE_ADMIN']],
	[pattern: '/runtimeMetrics/**',    access: ['ROLE_ADMIN']],
	[pattern: '/managedContainer/**',  access: ['ROLE_ADMIN']]
]

grails.plugin.springsecurity.filterChain.chainMap = [
	[pattern: '/assets/**',      filters: 'none'],
	[pattern: '/**/js/**',       filters: 'none'],
	[pattern: '/**/css/**',      filters: 'none'],
	[pattern: '/**/images/**',   filters: 'none'],
	[pattern: '/**/favicon.ico', filters: 'none'],
	[pattern: '/apiDefinition.json',  filters: 'JOINED_FILTERS,-exceptionTranslationFilter'],
	[pattern: '/specialUser.json',    filters: 'JOINED_FILTERS,-exceptionTranslationFilter'],
	[pattern: '/gatewayCore/refresh', filters: 'JOINED_FILTERS,-exceptionTranslationFilter'],
	[pattern: '/**',                  filters: 'JOINED_FILTERS,-basicAuthenticationFilter,-basicExceptionTranslationFilter']
]

grails.plugin.springsecurity.shiro.permissionDomainClassName = 'gateway.mgt.Permission'